-- GENERATED SPELL FOR [Iron Rune Guardian] --


function spell0_24212(pUnit, Event) --@Guardian Rune,Self--
pUnit:FullCastSpellOnTarget(49643,pUnit)
pUnit:RegisterEvent('Sorts_24212', 626, 1)
end

function spell1_24212(pUnit, Event) --@Guardian Strike,n/a--
pUnit:FullCastSpellOnTarget(49644,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24212', 612, 1)
end

function Sorts_24212(pUnit, Event)
local choix_sorts_24212 = math.random(0, 1)
if choix_sorts_24212 == 0 then
pUnit:RegisterEvent('spell0_24212', 1, 1)
end
if choix_sorts_24212 == 1 then
pUnit:RegisterEvent('spell1_24212', 1, 1)
end
end

function mob24212_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24212', math.random(1500, 3000), 1)
end

function mob24212_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24212_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24212_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24212, 1, 'mob24212_Action')
RegisterUnitEvent(24212, 2, 'mob24212_Leave')
RegisterUnitEvent(24212, 3, 'mob24212_Kill')
RegisterUnitEvent(24212, 4, 'mob24212_Die')
